<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>运算符</title>
</head>
<body>
<script>
    //++y 与y++的区别
//    y = 2;
//    x = 1;
//    //x = y++;
//    x = ++y;
//    console.log(y);
//    console.log(x);

    //== 与 ===
    a = 1;
    b = "1"
    console.log(a==b)
    console.log(a===b)

    //类似三元运算的表达式
    //var = (condition)?value1:value2
    //如果condition为true 返回value1 否则返回value2
    //python  a = "ok" if 1>3 else "error"
    a = 1>3? "ok":"error"
    console.log(a)

    //逻辑运算 && || !
</script>

</body>
</html>